package kr.co.mcshop.comment;

import java.util.Locale;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class CommentController {
	private static final Logger logger = LoggerFactory
			.getLogger(CommentController.class);

	@Autowired
	private CommentService commentService;
	
	@RequestMapping(value = "commentInsert", method = RequestMethod.POST)
	public String commentInsert(Locale locale, Model model, @RequestParam Map map) {
		
		System.out.println(map);
		commentService.commentInsert(map);

		return "redirect:board_detail";
	}
}
